<?php
//// ---------- -------- ------ Area para mensagens do sistema "DEU CERTO"  ---------- --------------- ------------- ------------------ --------- --------- ---------
    if($this->session->flashdata('mensagemok')){
    echo '<center>';
    echo '<BR><div class="ao" style="width:900px;background-color:#FFFFCC;
        font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;height:50px;
        line-height:50px;text-align:center;z-index:999;position:absolute;">'.$this->session->flashdata('mensagemok').'</div><BR>';
    echo '</center>';
    }   
//// ---------- -------- ------ FIM Area para mensagens do sistema "DEU CERTO" ---------- --------------- ------------- ------------------ --------- --------- ---------
?> 
<?php
//// ---------- -------- ------ Area para mensagens do sistema  "DEU ERRADO" ---------- --------------- ------------- ------------------ --------- --------- ---------
    if($this->session->flashdata('mensagemerro')){
    echo '<center>';
    echo '<BR><div class="ao" style="width:900px;background-color:#FFFFCC;
        font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;height:50px;
        line-height:50px;text-align:center;z-index:999;position:absolute;"><span style="color:red; text:center">'
        .$this->session->flashdata('mensagemerro').'</span></div><BR>';
    echo '</center>';
    }   
//// ---------- -------- ------ FIM Area para mensagens do sistema "DEU ERRADO" ---------- --------------- ------------- ------------------ --------- --------- ---------
?> 

<div class="conteudo">

<div class="top-paginas"></div>
    <div class="clear"></div>
  <div class="cont-anuncio">
    
<div class="content">
       	  
    <table width="960" border="1" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC" align="center">

    <tr>
        <th align="center"><strong style="padding-right:480px; padding-left: 5px">Página</strong></th>
        <th align="center"><strong style="padding-right:45px; padding-left: 5px">Posição</strong></th>
      <th align="center"><strong>Opções</strong></th>
    </tr>
    
  
    
<?php
foreach ($registro as $pag){
?>

    
<tr class="odd">
  	
    <td width="7%" align="center" style="text-align: left ; padding: 5px" ><b><?php echo $pag->pag_nome ?></b></td>
    <td width="7%" align="center" style="text-align: left ; padding: 5px"><?php echo $pag->pag_posicao ?></td>
    <td><table width="100%" border="0" cellspacing="5" class="options" cellpadding="0">
     <tr>
        <?php
        if($pag->pag_id == 1 ||$pag->pag_id == 2 ||$pag->pag_id == 3 ||$pag->pag_id == 4){
        ?>
        <td height="14"><img src="<?php echo base_url('assets/adm/imagens/lupa.png')?>" alt="" width="11" height="12" /></td>
        <td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/index/".($pgg+1).'/'.$pag->pag_id.'/1')); ?>">Ver Itens</a></td>
     	<td height="14"><img src="<?php echo base_url('assets/adm/imagens/lupa.png')?>" alt="" width="11" height="12" /></td>
        <td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/visualiza_pagina/".($pgg+1).'/'.$pag->pag_id)); ?>">Visualizar </a></td>
        <?php //opção desativada 
        //<td><img src="<?php echo base_url('assets/adm/imagens/lapis.gif')" alt="" width="14" height="14" /></td>
        //<td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/pagina_edita/".($pgg+1).'/'.$pag->pag_id)); ">Editar</a></td>
        ?>
        <?php
        }else if($pag->pag_id == 5){
        ?>        
        
        <td height="14"><img src="<?php echo base_url('assets/adm/imagens/lupa.png')?>" alt="" width="11" height="12" /></td>
        <td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/index/".($pgg+1).'/'.$pag->pag_id.'/1')); ?>">Ver Itens</a></td>
     	<td height="14"><img src="<?php echo base_url('assets/adm/imagens/lupa.png')?>" alt="" width="11" height="12" /></td>
        <td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/visualiza_pagina_pagamento/".($pgg+1).'/'.$pag->pag_id)); ?>">Visualizar </a></td>
        <?php //opção desativada 
        //<td><img src="<?php echo base_url('assets/adm/imagens/lapis.gif')" alt="" width="14" height="14" /></td>
        //<td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/pagina_edita/".($pgg+1).'/'.$pag->pag_id)); ">Editar</a></td>
        ?>
 
        <?php
        }else if($pag->pag_id == 6){
        ?>   

        <td height="14"><img src="<?php echo base_url('assets/adm/imagens/lupa.png')?>" alt="" width="11" height="12" /></td>
        <td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/index/".($pgg+1).'/'.$pag->pag_id.'/1')); ?>">Ver Itens</a></td>
     	<td height="14"><img src="<?php echo base_url('assets/adm/imagens/lupa.png')?>" alt="" width="11" height="12" /></td>
        <td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/visualiza_pagina_compartilhe/".($pgg+1).'/'.$pag->pag_id)); ?>">Visualizar </a></td>
        <?php //opção desativada 
        //<td><img src="<?php echo base_url('assets/adm/imagens/lapis.gif')" alt="" width="14" height="14" /></td>
        //<td><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/pagina_edita/".($pgg+1).'/'.$pag->pag_id)); ">Editar</a></td>
        ?>
 
        <?php
        }
        ?>   
        
        <?php // opção excluir desativada !! ---------------------------------------------------------------
        //<td><img src=" echo base_url('assets/adm/imagens/close.gif')" alt="" width="14" height="14" /></td>
        //<td><a href="echo (base_url("meu_painel_de_administracao/pagina/index/".($pgg))); ">Excluir</a></td>
        ?>
        
        </tr>
    </table></td>
    
</tr>
  
<?php
}
?>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
</table>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

<?php // -------------------=============---  Pagina��o -----------------===================------------------------ ?> 
<div class="conteudo">
<table width="100%" border="0" cellspacing="5" class="total" cellpadding="0">
<tr><td colspan="2"></td><td width="40%"></td></tr>
<tr><td colspan="2"></td><td width="40%"></td></tr>
  <tr>
    <td width="19%">&nbsp;</td>
    <td width="6%">&nbsp;</td>
    <td width="40%"></td> 
    <?php $quant_pg = ceil($quantreg/$numreg); ?>
    <?php    
    if ( ($pgg) >= 1) {
    ?>
    <td width="10%"><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/index/".($pgg))); ?>" style="color: white" ><div class="butok3">Anterior</a></div></td>
    <?php
    } else { 
    ?>
    <?php
    }
    ?>  
    <td width="16%">
    <?php
    for($i_pg = 0 ; $i_pg<$quant_pg ; $i_pg++) { 
    if (($pgg <= ($i_pg +2 )) && ($pgg >= ($i_pg -2))){
        if ($pgg == ($i_pg)) {  
    ?>              
    <div class="box-n"><span class=pgoff><?php echo $i_pg+1 ?></span></div>
    <?php   } else {
                        $i_pg2 = $i_pg;
    ?>
    <div class="box-n"><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/index/".($i_pg2+1)))?>" style="color: white"><span class=pgoxx><?php echo ($i_pg +1) ?></span></div></a>            
    <?php   
            }  
        }
    }
    ?> 
    </td>
    <?php       
    if ( ($pgg+2) <= $quant_pg) {
    ?>
    <td width="9%"><div class="butok3"><a href="<?php echo (base_url("meu_painel_de_administracao/pagina/index/".($pgg+2))) ?>" style="color: white">Pr&oacute;ximo</a></div></td>
    <?php
    }
    ?> 
    </tr>
</table>    
</div> 
<?php // -------------------=============---  Pagina��o -----------------===================------------------------ ?>  

        
        
        
        
        
        
</div>
    
    
    
    <!--cont-anuncio-->
    </div>
</div>
